package cc.vv.btpartyjob.jobactivities.adapter

import android.widget.ImageView
import android.widget.TextView
import cc.vv.baselibrary.adapter.SimpleCommonAdapter
import cc.vv.baselibrary.adapter.holder.ExtendViewHolder
import cc.vv.btpartyjob.jnimodule.server.OperationServer
import cc.vv.btpartyjob.jobactivities.R
import cc.vv.btpartyjob.jobactivities.moudel.bean.SanHuiYiKeBean
import cc.vv.lkimagecomponent2.LKImage
import cc.vv.lkimagecomponent2.lib.mode.ScaleMode

/**
 * 三会一课adapter
 * Created by Chen.qi on 2018/10/24.
 */
class SanHuiYiKeAdapter(layoutResId: Int) : SimpleCommonAdapter<SanHuiYiKeBean>(layoutResId) {
    override fun convert(helper: ExtendViewHolder, item: SanHuiYiKeBean, position: Int) {
        val picUrl = ""
        LKImage.load().scale(ScaleMode.CENTER_CROP)
                .crossFade(300).placeHolder(R.mipmap.icon_item_pic_shyk)
                .error(R.mipmap.icon_item_pic_shyk).load(picUrl).into(helper.getView<ImageView>(R.id.iv_isyL_itemPic))
        //title
        helper.getView<TextView>(R.id.tv_isyL_listTitle)?.text = item.title
        //创建时间
        helper.getView<TextView>(R.id.tv_isyL_createTime)?.text = OperationServer.formatStr(item.startTime)
    }
}